import { Command } from '@/commands/command.ts'
import { new_command } from '@/models/command.ts'

export class UrlCommand extends Command {
    public static new(args: string): Command {
        const command = new_command()
        command.args = args
        command.name = 'url'
        command.component = 'AllowCopyCommandComponent'

        return new UrlCommand(command, false)
    }

    usage(): string {
        return 'url [-d] URL'
    }

    description(): string {
        return `<div>对给定的URL进行编解码</div>
        <br/>
        <div>选项说明:</div>
        <br/>
        <div class="option-row"><span class="option-option">-d --decode</span><span>解码模式</span></div>`
    }
}
